package com.vvkee.job;

import com.vvkee.event.OrderCreateEvent;
import com.vvkee.utils.SpringUtil;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class OrderCreateTask {

    // @Scheduled(fixedRate = 5000)
    public void run() {
        long id = System.currentTimeMillis();
        OrderCreateEvent event = new OrderCreateEvent(this,
                " 订单 " + id + "创建成功");
        SpringUtil.getApplicationContext().publishEvent(event);
    }
}
